home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / utility / 520 / old2ansi / old2ansi.man next >
Encoding:
Text File  |  1991-04-16  |  1.9 KB  |  56 lines

  1. NAME
  2.  
  3.   Old2ANSI - Convert K&R C source file to ANSI-style prototypes.
  4.   
  5. SYNOPSIS
  6.  
  7.   Old2ANSI [n-] Oldfile Ansifile [Headerfile]
  8.  
  9. DESCRIPTION
  10.  
  11.   Old2ANSI changes the function declarations within a C source file to
  12.   the newer ANSI standard prototype method. It will optionally generate
  13.   a header (.h) file containing just these prototypes. This file can then
  14.   be #include'd in the source file so as to avoid compiler warnings
  15.   resulting from functions that are called before having been declared.
  16.   The Headerfile, if generated, is appended with the new prototypes.
  17.  
  18.   The n- flag controls the interpretation of nested comments. If this flag
  19.   is present, then comments may be nested in the form:
  20.   
  21.     /* outer comment /* inner comment */ outer comment */  code...
  22.  
  23.   If this flag is not present, then any one comment terminator terminates
  24.   the entire comment, like so:
  25.   
  26.     /* first comment /* second comment */  code...
  27.  
  28. BUGS
  29.  
  30.   Pre-processor directives are ignored. This means that odd cases which
  31.   use #ifdef, #ifndef, or #if may give strange results. Also, all function
  32.   declarations that are found in the source file are added to the header
  33.   file because of this. The user must take care to remove any prototypes
  34.   that are not needed because of false #ifdef's.
  35.  
  36.   Type declarations of the following form (used for functions) cause
  37.   a bad prototype:
  38.   
  39.     type[space]more_type[space]more_type
  40.   
  41.   An example of this is:
  42.  
  43.     int (*foo) ();
  44.   
  45.   If the second space is removed, a consistent prototype is generated.
  46.  
  47. AUTHOR
  48.  
  49.   Dan Wilga                     GEnie:    GRIBNIF
  50.   Gribnif Software              Internet: Dan.Wilga@saturn.ucc.umass.edu
  51.   P.O. Box 350                  Fax:      (413) 584-2565
  52.   Hadley, MA  01035             Voice:    (413) 584-7887
  53.  
  54.        Program and documentation Copyright © 1991, Gribnif Software.
  55.  
  56.